package com.qf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;


/**
   @author KING
   @ClassName: com.qf.entity.Product
   @Description: 该类的功能描述
   @date: 2021/11/6 17:16 
*/
    

/**
    * 商品表
    */
@Data
@TableName(value = "p_product")
public class Product {
    @TableId(value = "product_id", type = IdType.ASSIGN_ID)
    private Long productId;

    /**
     * 外键 分类ID
     */
    @TableField(value = "category_id")
    private Integer categoryId;

    /**
     * 商品名称
     */
    @TableField(value = "p_name")
    private String pName;

    /**
     * 商品简介
     */
    @TableField(value = "p_desc")
    private String pDesc;

    /**
     * 外键 商品标签ID
     */
    @TableField(value = "p_label")
    private Byte pLabel;

    /**
     * 主图片
     */
    @TableField(value = "photo")
    private String photo;

    /**
     * 删除状态：0->未删除；1->已删除
     */
    @TableField(value = "delete_status")
    private Integer deleteStatus;

    /**
     * 上架状态：0->下架；1->上架 2->待上架
     */
    @TableField(value = "publish_status")
    private Integer publishStatus;

    /**
     * 销量
     */
    @TableField(value = "sale")
    private Integer sale;

    /**
     * 价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 市场价
     */
    @TableField(value = "original_price")
    private BigDecimal originalPrice;

    /**
     * 商品重量，默认为千克
     */
    @TableField(value = "weight")
    private BigDecimal weight;

    /**
     * 库存
     */
    @TableField(value = "p_stock")
    private Integer pStock;

    /**
     * 1为固定运费 2为使用运费模板
     */
    @TableField(value = "p_freight")
    private Integer pFreight;

    /**
     * 商品编码(商户可录入自己的编码)
     */
    @TableField(value = "p_no")
    private String pNo;

    /**
     * 商品介绍
     */
    @TableField(value = "description")
    private String description;

    /**
     * 1.直接上架 2.等待手动上架 3.自定义上架时间
     */
    @TableField(value = "p_handing")
    private Integer pHanding;

    /**
     * 自定义上架的时间
     */
    @TableField(value = "shelf_time")
    private Date shelfTime;

    /**
     * 是否为预售商品：0->不是；1->是
     */
    @TableField(value = "preview_status")
    private Integer previewStatus;

    /**
     * 全款预售时间
     */
    @TableField(value = "preview_time")
    private Date previewTime;

    /**
     * 1.永久限额  2.周期限额的每日  3.周期限额的每周  4.周期限额的每月
     */
    @TableField(value = "p_quota")
    private Integer pQuota;

    /**
     * 限购的数量
     */
    @TableField(value = "quota_num")
    private Integer quotaNum;

    /**
     * 画册图片，连产品图片限制为5张，以逗号分割
     */
    @TableField(value = "pics")
    private String pics;

    /**
     * 创建的时间
     */
    @TableField(value = "p_create_date")
    private Date pCreateDate;

    /**
     * 商品类型 1、普通商品 2、预售商品
     */
    @TableField(value = "p_type")
    private Integer pType;

    public static final String COL_PRODUCT_ID = "product_id";

    public static final String COL_CATEGORY_ID = "category_id";

    public static final String COL_P_NAME = "p_name";

    public static final String COL_P_DESC = "p_desc";

    public static final String COL_P_LABEL = "p_label";

    public static final String COL_PHOTO = "photo";

    public static final String COL_DELETE_STATUS = "delete_status";

    public static final String COL_PUBLISH_STATUS = "publish_status";

    public static final String COL_SALE = "sale";

    public static final String COL_PRICE = "price";

    public static final String COL_ORIGINAL_PRICE = "original_price";

    public static final String COL_WEIGHT = "weight";

    public static final String COL_P_STOCK = "p_stock";

    public static final String COL_P_FREIGHT = "p_freight";

    public static final String COL_P_NO = "p_no";

    public static final String COL_DESCRIPTION = "description";

    public static final String COL_P_HANDING = "p_handing";

    public static final String COL_SHELF_TIME = "shelf_time";

    public static final String COL_PREVIEW_STATUS = "preview_status";

    public static final String COL_PREVIEW_TIME = "preview_time";

    public static final String COL_P_QUOTA = "p_quota";

    public static final String COL_QUOTA_NUM = "quota_num";

    public static final String COL_PICS = "pics";

    public static final String COL_P_CREATE_DATE = "p_create_date";

    public static final String COL_P_TYPE = "p_type";
}